<template>
  <edit-page v-loading="loading">
    <template #top>
      <el-form ref="formRef" :model="form">
        <info-header id="basic" title="基本信息"></info-header>
        <pub-edit-description :ndColumns="2">
          <pub-edit-description-item :span="2" label="社区服务站名称" required>
            <el-form-item prop="name1" :rules="$formRules.input">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="2" label="所属区域" required>
            <el-form-item prop="name1" :rules="$formRules.input">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="2" label="详细地址" required>
            <el-form-item prop="name1" :rules="$formRules.input">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="1" label="负责人" required>
            <el-form-item prop="name1" :rules="$formRules.input">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="1" label="负责人联系电话" required>
            <el-form-item prop="name1" :rules="$formRules.input">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="1" label="社区服务站电话">
            <el-form-item prop="name1">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="1" label="服务区域范围">
            <el-form-item prop="name1">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="2" label="主管街道中心">
            <el-form-item prop="name1">
              <pub-input v-model="form.name1" />
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="2" label="社区服务站简介">
            <el-form-item prop="name1">
              <pub-textarea v-model="form.name1"></pub-textarea>
            </el-form-item>
          </pub-edit-description-item>
          <!-- <pub-edit-description-item :span="1" label="证件类型" required>
            <el-form-item prop="sscode" :rules="$formRules.input">
              <pub-select-dict
                width="100%"
                v-model="form.sscode"
                dict-code="SF"
                placehoder="请选择"
              ></pub-select-dict>
              <pub-area-cascader
                v-model:formValue="form"
                width="100%"
                :maxLevel="2"
                :disabledLevel="-1"
              />
            </el-form-item>
          </pub-edit-description-item> -->
        </pub-edit-description>
        <info-header id="file" title="附件" class="mt-5px"></info-header>
        <pub-edit-description :ndColumns="1">
          <pub-edit-description-item :span="1" label="办证情况说明">
            <el-form-item
              prop="certificationMaterial"
            >
              <pub-upload
                v-model:fileIds="form.certificationMaterial"
                biz-type="ZCCQXXDJ-BZQKSM"
                :limit="5"
                @uploading="fileUploading = $event"
              ></pub-upload>
            </el-form-item>
          </pub-edit-description-item>
          <pub-edit-description-item :span="1" label="其他宣传展示图片">
            <el-form-item
              prop="certificationMaterial"
            >
              <pub-upload
                v-model:fileIds="form.certificationMaterial"
                biz-type="ZCCQXXDJ-BZQKSM"
                :limit="5"
                @uploading="fileUploading = $event"
              ></pub-upload>
            </el-form-item>
          </pub-edit-description-item>
        </pub-edit-description>
      </el-form>
    </template>
    <template #bottom>
      <el-button size="small" @click="emit('close')">取消</el-button>
      <el-button
        v-prevent-repeat-click
        size="small"
        type="primary"
        @click="submit"
      >
        保存
      </el-button>
    </template>
  </edit-page>
</template>
<script setup>
const form = ref({
  name: '',
  name1: '',
  nationCode: '',
  sscode: ''
})
const loading = ref(false)
// const router = useRouter()
const emit = defineEmits(['close'])
const formRef = ref(null)
const submit = async () => {
  formRef.value.validate(valid => {
    console.log(form.value)
  })
}
</script>
<style lang="scss" scoped></style>
